package com.app.core;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
 
public class Message {
	private String welcome;
	private List<String> username; //存放用户集合
	private String context;
	
	public String getWelcome() {
		return welcome;
	}
	public void setWelcome(String welcome) {
		this.welcome = welcome;
	}
	public List<String> getUsername() {
		return username;
	}
	public void setUsername(List<String> username) {
		this.username = username;
	}
	public String getContext() {
		return context;
	}
	public void setContext(String context) {
		this.context = context;
	}
	public void setContext(String name,String msg) {
		/*this.context = name +" 在"
				+ new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date()) + "说"
				+ msg + "" ;*/
		this.context = "<img style=\"border-radius:50%;\" src=\"images/default.jpg\" width=\"30\" />"
				+ "<span class='name' style='color:#222;margin-left:2px;'>"+name+"</span>"
				+ "<span style='position: relative;top: -8px;color:#FFF;background:#ccc;border-radius:10px;padding:2px 6px;margin-left:60px;display:inline-block;'>"+new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date())+"</span>"
				+ "<div class='dialog'>" + msg + "</div>" ;
	}
}
